package com.scriptback.dto.project;

import com.scriptback.entity.Project;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 项目响应DTO
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ProjectResponseDTO {

    private String projectId; // 项目ID
    private String projectName; // 项目名称
    private String projectDescription; // 项目描述

    // 从实体转换的静态方法
    public static ProjectResponseDTO fromEntity(Project project) {
        return new ProjectResponseDTO(
                project.getId(),          // project_id
                project.getName(),        // project_name
                project.getDescription()  // project_description
        );
    }
}
